const state = {
  username: "",
  nick_name: "",
  mobile: "",
  email: "",
  permissions: JSON.stringify([])
};

const getters = {};

const mutations = {
  setUser: (state, username) => {
    state.username = username;
  },
  set_nick_name: (state, nick_name) => {
    state.nick_name = nick_name;
  },
  set_mobile: (state, mobile) => {
    state.mobile = mobile;
  },
  set_email: (state, email) => {
    state.email = email;
  },
  set_permissions: (state, permissions) => {
    state.permissions = permissions;
  }
};

const actions = {};

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
};
